<?php
include_once '!config.php';
use models\Select as Select;
$select = new Select();
switch($_GET[action]){
    case 'multiSelectAdd':      $select->multiSelectAdd($_POST['fieldId'], $_POST['itemId']);
                                $item['fieldId'] = $_POST['fieldId'];
                                $item['values'] = $select->read($_POST['fieldId'], $_POST['itemId']);
                                $smarty->assign('item', $item);
                                $smarty->display('form/multiselect/list.tpl');
                                break;
    case 'multiSelectDelete':   echo $select->multiSelectDelete();
                                break;
    case 'multiSelectClear':    echo $select->multiSelectClear();
                                break;
}
?>